<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
	<link rel="stylesheet" href="/css/index.css"/>
	<link rel="stylesheet" href="/css/swiper3.07.min.css"/>
	<script src="/js/jquery-1.7.2.min.js"></script>
	<script src="/js/jquery-1.11.2.min.js"  ></script>
	<script src="/js/main.js"></script>
	<script src="/js/koala.min.1.5.js" th:src="@{/js/koala.min.1.5.js}"></script>
	<style>
		.swiper-container {
			width: 1100px;
			height: 300px;
			margin: 0 auto;
		}
	</style>
	<title th:text="${setting.siteName}+'-主页'">易书网</title>
</head>
<body>

<!--引入 头部片段-->
<div  th:replace="mall/common/mall_common :: header"></div>


<div class="banner container">
	
	<div class="clearfix">
		<div class="about fl" th:utext="${setting.introduce}">
			<h1>易书网</h1>
			<img src="images/logo9.png" alt="" th:src="@{/images/logo9.png}"/>
			<p><span>易书网</span>是一个网上书商城。力求打造网上最大的中文图书借换系统二手书交换系统力求打造是是
			网上最大的中文图书借换系统二手书交换系统。易书网来了,让爱书
			的你花极小的支出(1到2元)就可以读到你喜欢的书且没有后顾之忧哦！</p>
		</div>
		<div id="fsD1" class="focus fl">
			<div id="D1pic1" class="fPic">

				<div class="fcon" th:each="garousel:${garousels}">
					<a href="detail.html" th:href="${garousel.httpUrl}"><img th:src="${garousel.imageUrl}" src="/images/focus1.jpg" /></a>
					<span class="shadow"><a href="detail.html" th:href="${garousel.httpUrl}" th:text="${garousel.title}">便宜出售一本好书111111</a></span>
				</div>

			</div>

			<div class="fbg">
				<div class="D1fBt" id="D1fBt">
					<a href="javascript:void(0)" th:each="garousel:${garousels}" class="current"><i>1</i></a>
				</div>
			</div>
		</div>
		<div class="help fr">
			<h2>最新公告<a href="/mall/notice.html" style="margin-left: 80px">更多..</a></h2>
			<ul>
				<li th:each="notice:${newNotice}"><a href="notice-detail.html" th:href="'notice-detail.html?id='+${notice.id}" th:text="${#strings.abbreviate(notice.title,15)}">这是易书网最新公告</a></li>
			</ul>
			<h2>新手帮助<a href="/mall/help.html" style="margin-left: 80px">更多..</a></h2>
			<ul>
				<li th:each="help:${helpList}"><a href="help.html" th:href="'help.html?id='+${help.id}" th:text="${help.title}">如何买书</a></li>
			</ul>
		</div>
	</div>
	<div class="item clearfix" id="item1">
		<h1>分类图书<span></span>
			<!--<a href="list.html">+更多</a>-->
		</h1>
		<div class="list fl" style="height: 100%">
			<ul class="one" >
				<li th:each="parentNode:${classifyNode}" th:if="${parentNode.classifyList!=null}"><a href="javascript:;" th:text="${parentNode.classifyName}" th:onclick="'javascript:classifyBook();'">成功励志</a>
					<ul class="two">
						<li th:each="node:${parentNode.classifyList}"><a href="javascript:;" th:text="${node.classifyName}" th:onclick="'javascript:classifyBook('+${node.id}+');'">成功励志1</a></li>
					</ul>
				</li>
			</ul>
		</div>

		<div class="book-wrap fr">
			<div class="book clearfix dataList">

				<dl  th:fragment="dataList" th:each="books:${booksList}">
					<dt><a href="detail.html" th:href="'detail.html?id='+${books.id}"><img th:src="${books.imageUrl}" src="/images/book.jpg" alt="" th:width="100px" th:height="150px" /></a></dt>
					<dd>
						<p><a href="detail.html"  th:href="'detail.html?id='+${books.id}" th:text="${books.bookName}">福尔摩斯探案全集</a></p>
						<p th:if="${books.isdiscount==1}" th:text="'价格：￥'+${books.price}">价格：￥25</p>
						<p th:if="${books.isdiscount==2}"><s  th:text="'价格：￥'+${books.price}">价格：￥25</s> <span th:text="'￥'+${books.discount}">￥7</span> </p>
					</dd>
				</dl>

				<dl>
					<dt><a href="detail.html"><img src="/images/book.jpg" alt="" /></a></dt>
					<dd>
						<p><a href="detail.html">福尔摩斯探案全集</a></p>
						<p>数量：99</p>
						<p><s>价格：￥25</s> ￥7</p>
					</dd>
				</dl>

			</div>
		</div>
	</div>
	<div class="item clearfix" id="item3">
		<h1>最新图书<span></span></h1>
		<div class="tabs book clearfix">
			<dl  th:each="books:${newBooks}">
				<dt><a href="detail.html" th:href="'detail.html?id='+${books.id}"><img th:src="${books.imageUrl}" src="/images/book.jpg" alt="" th:width="100px" th:height="150px" /></a></dt>
				<dd>
					<p><a href="detail.html"  th:href="'detail.html?id='+${books.id}" th:text="${books.bookName}">福尔摩斯探案全集</a></p>
					<p th:if="${books.isdiscount==1}" th:text="'价格：￥'+${books.price}">价格：￥25</p>
					<p th:if="${books.isdiscount==2}"><s  th:text="'价格：￥'+${books.price}">价格：￥25</s> <span th:text="'￥'+${books.discount}">￥7</span> </p>
				</dd>
			</dl>
		</div>
	</div>

</div>
<!--引入 尾部片段-->
<div  th:replace="mall/common/mall_common :: footer"></div>

<div class="fixnav">
	<ul>
		<li><a href="#" title="1">分类图书</a></li>
		<li><a href="#" title="3">最新图书</a></li>
		<li><a href="#" title="4">返回顶部</a></li>
		<li><a  href="http://wpa.qq.com/msgrd?v=3&uin=2078140086&site=qq&menu=yes">联系客服</a></li>
	</ul>
</div>
<script src="/layui/layui.js"></script>
<script type="text/javascript">
	$("#dataList").click(function () {
		var data = $("#bookName").val();
		console.log(data)
		location.href="/mall/list.html?bookName="+data;
		return false;
	})

	classifyBook()
	function classifyBook(id){
		$.get("/books/classifyBooksList",{"id":id},function (data) {
			$(".dataList").html(data);
		});
	}

	Qfast.add('widgets', { path: "/js/terminator2.2.min.js", type: "js", requires: ['fx'] });
	Qfast(false, 'widgets', function () {
		K.tabs({
			id: 'fsD1',   //焦点图包裹id
			conId: "D1pic1",  //** 大图域包裹id
			tabId:"D1fBt",
			tabTn:"a",
			conCn: '.fcon', //** 大图域配置class
			auto: 1,   //自动播放 1或0
			effect: 'fade',   //效果配置
			eType: 'click', //** 鼠标事件
			pageBt:true,//是否有按钮切换页码
			bns: ['.prev', '.next'],//** 前后按钮配置class
			interval: 3000  //** 停顿时间
		})
	})
</script>
</body>
</html>